package org.publiccms.entities.home;
// Generated 2016-11-13 14:04:11 by Hibernate Tools 4.3.1

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.publiccms.common.generator.annotation.GeneratorColumn;

/**
 * HomeGroupApply generated by hbm2java
 */
@Entity
@Table(name = "home_group_apply")
public class HomeGroupApply implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    @GeneratorColumn(title = "群组")
    private HomeGroupApplyId id;
    @GeneratorColumn(title = "消息")
    private String message;
    @GeneratorColumn(title = "已禁用", condition = true)
    private boolean disabled;
    @GeneratorColumn(title = "创建日期")
    private Date createDate;

    public HomeGroupApply() {
    }

    public HomeGroupApply(HomeGroupApplyId id, String message,boolean disabled, Date createDate) {
        this.id = id;
        this.message = message;
        this.disabled = disabled;
        this.createDate = createDate;
    }

    @EmbeddedId

    @AttributeOverrides({ @AttributeOverride(name = "groupId", column = @Column(name = "group_id", nullable = false)),
            @AttributeOverride(name = "userId", column = @Column(name = "user_id", nullable = false)) })
    public HomeGroupApplyId getId() {
        return this.id;
    }

    public void setId(HomeGroupApplyId id) {
        this.id = id;
    }

    @Column(name = "message", nullable = false, length = 65535)
    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
    
    @Column(name = "disabled", nullable = false)
    public boolean isDisabled() {
        return this.disabled;
    }

    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_date", nullable = false, length = 19)
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

}
